package Io;

import java.io.IOException;
import java.io.PrintStream;

public class PrintDemo {
    public static void main(String[] args) throws IOException {
        PrintStream p = new PrintStream("print.txt");//打印流的文件地址
        System.setOut(p);//设置打印流的输出地址
        System.out.println("你真好");
        p.close();
    }
}
